<template>
	<div>
		<el-card shadow="never">
			<!-- <h1>{{this.$router.currentRoute.name}}</h1> -->
			<el-table v-loading="loading" :data="tableData" style="width: 100%;margin-top: 20px">
				<el-table-column type="index" width="50"></el-table-column>
				<el-table-column label="ID" align="center"  prop="equBindId"></el-table-column>
				<el-table-column label="设备编号" align="center"  prop="equId"></el-table-column>
				<el-table-column label="运维ID" align="center"  prop="devId"></el-table-column>
				<el-table-column label="代理商ID" align="center"  prop="ageId"></el-table-column>
				<el-table-column label="所属店长" align="center"  prop="memId"></el-table-column>
				<el-table-column label="所属店铺" align="center"  prop="shopId"></el-table-column>
				<el-table-column label="绑定时间" align="center"  prop="bindTime"></el-table-column>
				
			</el-table>
			<div style="margin-top: 20px;text-align: right">
				<el-pagination background @current-change="columnFind" :current-page="page.page" :page-size="page.pagesize" layout="prev, pager, next, jumper, total"
				 :total="page.count"></el-pagination>
			</div>
		</el-card>
	</div>
</template>

<script>
	import {
		bindLogList
	} from '../../../../server/index.js';
import Cookie from 'js-cookie';
	export default {
		data() {
			return {
				tableData: [],
				page: {
					count: 0,
					pagesize: 10,
					page: 1
				},
				loading: true
			};
		},
		mounted() {
			var page = 1;
			this.columnFind(page);
			Cookie.remove('tabList');
		},
		methods: {
			columnFind(page) {
				const _this = this;
				_this.page.page = page;
				let obj = {
					keyword: '',
					page: _this.page.page,
					rows: _this.page.pagesize
				};
				// _this.tableData = []

				this.http.request({
					url: bindLogList,
					data: obj,
					success: function(res) {
						_this.loading = false;
						_this.tableData = res.list;
						_this.page.count = res.total;
					},
					error: function(err) {
						_this.$message({
							offset: '200',
							message: err.msg
						})
					}
				});
			}
		}
	};
</script>

<style></style>
